<?php
class News extends CI_controller{
	public function __construct(){
		parent::__construct();
		$this->load->model('news_model');
	}
	
	public function index(){
		print_r('ww');
		$data['news'] = $this->news_model->get_news();
		
		$data['title'] = '这里是新闻首页';
		$this->load->view('templates/header', $data);		
		$this->load->view('news/index', $data);
		$this->load->view('templates/footer', $data);
	}
	public function view($slug){
		$data['news'] = $this->news_model->get_news($slug);
	}
}